package com.coursehub.exercise.dto;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.Max;
import lombok.Data;

/**
 * 练习提交数据传输对象
 */
@Data
public class ExerciseSubmissionDto {
    
    @NotBlank(message = "用户ID不能为空")
    private String userId;
    
    @NotBlank(message = "练习ID不能为空")
    private String exerciseId;
    
    @NotNull(message = "练习分数不能为空")
    @Min(value = 0, message = "练习分数不能小于0")
    @Max(value = 100, message = "练习分数不能大于100")
    private Integer score;
    
    // 可选的答案数据，具体结构可以根据需要扩展
    private Object answerData;
}